package com.h3c.ptability.client;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * EOS消息中心消息发送客户端
 * @author l22886
 * @date 2021/6/21
 */
@FeignClient(name = "eos-message", url = "${eos.message.url}")
public interface EosMessageClient {

    /**
     * 发送EOS消息（企微消息；短信；邮件；）
     *
     * @param str 域账号
     * @param Authorization
     * @return
     */
    @PostMapping(value = "message/send", consumes = {"application/json"}, headers = {"Authorization={Authorization}"})
    JSONObject sendEosMessge(@RequestBody String str, @RequestParam("Authorization") String Authorization);

}
